<template>
    <div class="study-item2">
        <div class="item"  @click="toLinkFun">
            <div class="item-img">
                <img :src="item.image" alt="">
                <div class="item-img-bottom">
                    <div class="item-img-bottom--left"></div>
                    <div class="item-img-bottom--right">合集</div>
                </div>
            </div>
            <div class="item-title u-line-2">{{ item.title }}</div>
            <div class="item-time">{{ item.created_at }}</div>
        </div>
    </div>
</template>

<script>
export default {
    name: "StudyItem2",
    props: {
        item: {
            type:Object,
            default:()=>{
                return {}
            }
        },
    },
    methods:{
        toLinkFun(){
            this.$router.push({
                path:`/study-list2/${this.item.id}`
            })
        }
    }
};
</script>

<style lang="less" scoped>
.study-item2{
    width: 4.1875rem;
    .item{
        width: 100%;
        cursor: pointer;
        .item-img{
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            width: 100%;
            height: 3rem;
            
            img{
                width: 100%;
                height: 100%;
                object-fit: cover;
                border-radius: 0.0625rem;
            }
            .item-img-bottom{
                position: absolute;
                bottom: 0;
                left: 0;
                display: flex;
                align-items: center;
                justify-content: space-between;
                box-sizing: border-box;
                padding: 0 0.15rem;
                width: 100%;
                height: 0.65rem;
                background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.41) 82%, rgba(0,0,0,0.5) 100%);
                border-radius: 0.0625rem ;
                .item-img-bottom--left{
                    font-size: 0.2rem;
                    color: #fff;
                }
                .item-img-bottom--right{
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 0.6rem;
                    height: 0.275rem;
                    border-radius: 0.05rem ;
                    ont-size: 0.2rem;
                    color: #fff;
                }
            }
        }
        .item-title{
            font-size: 0.25rem;
            color: #000;
            font-weight: bold;
            line-height: 0.375rem;
            margin-top: 0.25rem;
        }
        .item-time{
            font-size: 0.2rem;
            color: #9FA6C2;
            padding: 0.15rem 0;
        }
    }
}
</style>